package database;

import java.io.File;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;

import enumerators.Answer;
import enumerators.Gender;

public class Patient implements Serializable {

	private static final long serialVersionUID = -1234405620715850294L;
	private String currentDir = new File("").getAbsolutePath();
	private String name;
	private String address;
	private String age;
	private Gender gender;
	private String phoneNumber;
	private String birthLocal;
	private Calendar birthDate;
	private String profession;
	private String hobby;
	private String civilState;
	private String brothersAndRelation;
	private String childrenAndRelation;
	private String socialRelation;
	private String coexistsWithChildren;
	private String livesAlone;
	private String visitingOne;
	private Answer institutionalized;
	private String visitingTwo;
	private Answer homeSupport;
	private String transpersonality;
	private String smokerDrinks;
	private Answer dcl;
	private String neurologicDesease;
	private String otherDesease;
	private String alternativeTerapy;
	private String therapeutic;
	private String motricity;
	private Answer prostheses;
	private String ta;
	private String dia;
	private String pul;
	private String avd;
	private String abvd;
	private String notes;
	private String scholarity;
	private ArrayList<Meagp> meagpList;
	private ArrayList<Meaom> meaomList;
	private ArrayList<Mbjdec> mbjdecList;
	private DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
	private DateFormat hourFormat = new SimpleDateFormat("HH:mm");
	private Calendar cal;
	private String imagePath;
	private String additionalInformation;
	private Answer dA;
	private boolean finalized;
	private boolean archive;
	private ArrayList<Object> additionalFiels;

	public Patient() {
		super();
		name = new String();
		address = new String();
		age = new String();
		gender = Gender.UNDEFINED;
		phoneNumber = new String();
		birthLocal = new String();
		profession = new String();
		hobby = new String();
		civilState = new String();
		brothersAndRelation = new String();
		childrenAndRelation = new String();
		socialRelation = new String();
		coexistsWithChildren = new String();
		livesAlone = new String();
		visitingOne = new String();
		visitingTwo = new String();
		homeSupport = Answer.UNDEFINED;
		transpersonality = new String();
		smokerDrinks = new String();
		dcl = Answer.UNDEFINED;
		neurologicDesease = new String();
		otherDesease = new String();
		alternativeTerapy = new String();
		therapeutic = new String();
		motricity = new String();
		prostheses = Answer.UNDEFINED;
		ta = new String();
		dia = new String();
		pul = new String();
		scholarity = new String();
		meagpList = new ArrayList<Meagp>();
		meaomList = new ArrayList<Meaom>();
		mbjdecList = new ArrayList<Mbjdec>();
		avd = new String();
		abvd = new String();
		notes = new String();
		cal = Calendar.getInstance();
		additionalInformation = new String();
		finalized = false;
		imagePath = currentDir + "\\images\\db_images\\no_picture.png";
		archive = false;
		institutionalized = Answer.UNDEFINED;
		dA = Answer.UNDEFINED;
		additionalFiels = new ArrayList<Object>();
	}

	public ArrayList<Object> getAdditionalFiels() {
		return additionalFiels;
	}

	public void setAdditionalFiels(ArrayList<Object> additionalFiels) {
		this.additionalFiels = additionalFiels;
	}

	public Answer getdA() {
		return dA;
	}

	public void setdA(Answer dA) {
		this.dA = dA;
	}

	public boolean isArchive() {
		return archive;
	}

	public void setArchive(boolean archive) {
		this.archive = archive;
	}

	public boolean isFinalized() {
		return finalized;
	}

	public void setFinalized(boolean finalized) {
		this.finalized = finalized;
	}

	public String getAdditionalInformation() {
		return additionalInformation;
	}

	public void setAdditionalInformation(String additionalInformation) {
		this.additionalInformation = additionalInformation;
	}

	public String getTa() {
		return ta;
	}

	public void setTa(String ta) {
		this.ta = ta;
	}

	public String getDia() {
		return dia;
	}

	public void setDia(String dia) {
		this.dia = dia;
	}

	public String getPul() {
		return pul;
	}

	public void setPul(String pul) {
		this.pul = pul;
	}

	public String getNeurologicDesease() {
		return neurologicDesease;
	}

	public void setNeurologicDesease(String neurologicDesease) {
		this.neurologicDesease = neurologicDesease;
	}

	public String getOtherDesease() {
		return otherDesease;
	}

	public void setOtherDesease(String otherDesease) {
		this.otherDesease = otherDesease;
	}

	public String getCoexistsWithChildren() {
		return coexistsWithChildren;
	}

	public void setCoexistsWithChildren(String coexistsWithChildren) {
		this.coexistsWithChildren = coexistsWithChildren;
	}

	public Mbjdec getMbjdec(int index) {
		return mbjdecList.get(index);
	}

	public int getNumberOfMbjdec() {
		return mbjdecList.size();
	}

	public void addMbjdec(Mbjdec mbjdec) {
		mbjdecList.add(mbjdec);
	}

	public void removeMbjdec(Mbjdec mbjdec) {
		mbjdecList.remove(mbjdec);
	}

	public int getNumberOfMbjdec(Mbjdec mbjdec) {
		return mbjdecList.indexOf(mbjdec);
	}

	public Meaom getMeaom(int index) {
		return meaomList.get(index);
	}

	public int getNumberOfMeaom() {
		return meaomList.size();
	}

	public void addMeaom(Meaom meaom) {
		meaomList.add(meaom);
	}

	public void removeMeaom(Meaom meaom) {
		meaomList.remove(meaom);
	}

	public int getNumberOfMeaom(Meaom meaom) {
		return meaomList.indexOf(meaom);
	}

	public Meagp getMeagp(int index) {
		return meagpList.get(index);
	}

	public boolean existsMeagp(Meagp meagp) {
		return meagpList.contains(meagp);
	}

	public boolean existsMeaom(Meaom meaom) {
		return meaomList.contains(meaom);
	}

	public boolean existsMbjdec(Mbjdec mbjdec) {
		return mbjdecList.contains(mbjdec);
	}

	public int getNumberOfMeagp() {
		return meagpList.size();
	}

	public void addMeagp(Meagp meagp) {
		meagpList.add(meagp);
	}

	public void removeMeagp(Meagp meagp) {
		meagpList.remove(meagp);
	}

	public int getNumberOfMEAGP(Meagp meagp) {
		return meagpList.indexOf(meagp);
	}

	public String getScholarity() {
		return scholarity;
	}

	public void setScholarity(String scholarity) {
		this.scholarity = scholarity;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}

	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getBirthLocal() {
		return birthLocal;
	}

	public void setBirthLocal(String birthLocal) {
		this.birthLocal = birthLocal;
	}

	public Calendar getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Calendar birthDate) {
		this.birthDate = birthDate;
	}

	public String getProfession() {
		return profession;
	}

	public void setProfession(String profession) {
		this.profession = profession;
	}

	public String getHobby() {
		return hobby;
	}

	public void setHobby(String hobby) {
		this.hobby = hobby;
	}

	public String getCivilState() {
		return civilState;
	}

	public void setCivilState(String civilState) {
		this.civilState = civilState;
	}

	public String getBrothersAndRelation() {
		return brothersAndRelation;
	}

	public void setBrothersAndRelation(String brothersAndRelation) {
		this.brothersAndRelation = brothersAndRelation;
	}

	public String getChildrenAndRelation() {
		return childrenAndRelation;
	}

	public void setChildrenAndRelation(String childrenAndRelation) {
		this.childrenAndRelation = childrenAndRelation;
	}

	public String getSocialRelation() {
		return socialRelation;
	}

	public void setSocialRelation(String socialRelation) {
		this.socialRelation = socialRelation;
	}

	public String getLivesAlone() {
		return livesAlone;
	}

	public void setLivesAlone(String livesAlone) {
		this.livesAlone = livesAlone;
	}

	public String getVisitingOne() {
		return visitingOne;
	}

	public void setVisitingOne(String visitingOne) {
		this.visitingOne = visitingOne;
	}

	public Answer getInstitutionalized() {
		return institutionalized;
	}

	public void setInstitutionalized(Answer institutionalized) {
		this.institutionalized = institutionalized;
	}

	public String getVisitingTwo() {
		return visitingTwo;
	}

	public void setVisitingTwo(String visitingTwo) {
		this.visitingTwo = visitingTwo;
	}

	public Answer getHomeSupport() {
		return homeSupport;
	}

	public void setHomeSupport(Answer homeSupport) {
		this.homeSupport = homeSupport;
	}

	public String getTranspersonality() {
		return transpersonality;
	}

	public void setTranspersonality(String transpersonality) {
		this.transpersonality = transpersonality;
	}

	public String getSmokerDrinks() {
		return smokerDrinks;
	}

	public void setSmokerDrinks(String smokerDrinks) {
		this.smokerDrinks = smokerDrinks;
	}

	public Answer getDCL() {
		return dcl;
	}

	public void setDCL(Answer dcl) {
		this.dcl = dcl;
	}

	public String getAlternativeTerapy() {
		return alternativeTerapy;
	}

	public void setAlternativeTerapy(String alternativeTerapy) {
		this.alternativeTerapy = alternativeTerapy;
	}

	public String getTherapeutic() {
		return therapeutic;
	}

	public void setTherapeutic(String therapeutic) {
		this.therapeutic = therapeutic;
	}

	public String getMotricity() {
		return motricity;
	}

	public void setMotricity(String motricity) {
		this.motricity = motricity;
	}

	public Answer getProstheses() {
		return prostheses;
	}

	public void setProstheses(Answer prostheses) {
		this.prostheses = prostheses;
	}

	public String getAVD() {
		return avd;
	}

	public void setAVD(String aVD) {
		avd = aVD;
	}

	public String getABVD() {
		return abvd;
	}

	public void setABVD(String aBVD) {
		abvd = aBVD;
	}

	public String getNotes() {
		return notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	public String getHour() {
		return "" + hourFormat.format(cal.getTime());
	}

	public String getDate() {
		return "" + dateFormat.format(cal.getTime());
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

}
